<?php


namespace app\user\controller;


use app\user\model\YjModel;

class Yj extends Base
{
    protected $noNeedLogin = '*';

    public function add()
    {
        $data = input('post.');
        if (empty($data['content'] && $data['contact'])){
            $this->error('请填写反馈意见及联系方式');
        }
        $data['create_time'] = date('Y-m-d H:i:s');
        $add =YjModel::create($data);
        if ($add){
            $this->success('提交意见成功');
        }
        $this->error('提交意见失败');

    }

}